#ifndef __ds1302_H 
#define __ds1302_H  

#include "sys.h" 

#define CE_L GPIO_ResetBits(GPIOA,GPIO_Pin_5)//?????
#define CE_H GPIO_SetBits(GPIOA,GPIO_Pin_5)//?????
#define SCLK_L GPIO_ResetBits(GPIOA,GPIO_Pin_7)//?????
#define SCLK_H  GPIO_SetBits(GPIOA,GPIO_Pin_7)//?????
#define DATA_L  GPIO_ResetBits(GPIOA,GPIO_Pin_6)//?????
#define DATA_H  GPIO_SetBits(GPIOA,GPIO_Pin_6)//?????

struct TIMEData
{
	u16 year;
	u8  month;
	u8  day;
	u8  hour;
	u8  minute;
	u8  second;
	u8  week;
};//??TIMEData?????????????
extern struct TIMEData TimeData;//????
extern struct TIMEData lssj;
void ds1302_gpio_init();//ds1302?????
void ds1302_write_onebyte(u8 data);//?ds1302???????
void ds1302_wirte_rig(u8 address,u8 data);//????????????
u8 ds1302_read_rig(u8 address);//????????????
void ds1032_init();//ds1302?????
void ds1032_DATAOUT_init();//IO???????
void ds1032_DATAINPUT_init();//IO???????
void ds1032_read_time();//?ds1302??????(BCD?)
void ds1032_read_realTime();//?BCD?????????

#endif

